package com.richard.design.principle.dependenceinversion;

/**
 * @author Richard·Wang
 * @Date 2021/4/4 19:46
 * @Version 1.0
 */
public class Geely {

    private  ICourse iCourse;

    public void setiCourse(ICourse iCourse) {
        this.iCourse = iCourse;
    }

    public void studyImoocCourse(){
        iCourse.studyCourse();
    }

    /** v3版本
     *  private  ICourse iCourse;
     *
     *     public Geely(ICourse iCourse) {
     *         this.iCourse = iCourse;
     *     }
     */



    /** v2版本
     *  public void studyImoocCourse(ICourse iCourse){
     *        iCourse.studyCourse();
     *    }
     */


}
